package com.lmt_13;

import java.io.BufferedInputStream;
import java.io.FileInputStream;
import java.io.InputStream;

public class BufferReaderStreamTest {
    public static void main(String[] args) {
        try(
                FileInputStream inputStream = new FileInputStream("src/com/lmt_13/1.txt");
               InputStream stream = new BufferedInputStream(inputStream)
        ){
            byte []data = new byte[1024];
            int len ;
            while ((len = stream.read(data))!=-1){
                System.out.print(new String(data));
            }

        }catch (Exception e){
            e.printStackTrace();
        }
    }
}
